{include file="public/header" /}
<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>编辑</h5>
                </div>
                <div class="ibox-content layui-form">
                    <div class="layui-row layui-col-space10 layui-form-item ">
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <!--<div class="layui-form-label">1：</div>-->
                            <div class="layui-input-block">
                                {for start="$start" end="$end"}
                                {$i}:（
                                <input type="radio" name="date_{$i}" value="黑" title="黑" {$info['ud_json'][$i]=='黑' ? 'checked' : ''} />
                                <input type="radio" name="date_{$i}" value="红" title="红" {$info['ud_json'][$i]=='红' ? 'checked' : ''} />）
                                &nbsp;&nbsp;&nbsp;&nbsp;
                                {if $i % 3 == 0}
                                <br />
                                <br />
                                {/if}
                                {/for}
                            </div>
                        </div>
                        <input type="hidden" name="start" value="{$start}" />
                        <input type="hidden" name="end" value="{$end}" />
                        <input type="hidden" name="ud_id" value="{$info.ud_id}" />

                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <div class="layui-input-block">
                                <button class="layui-btn" lay-submit="" lay-filter="component-form-element">保存
                                </button>
                                <button class="layui-btn layui-btn-primary" onclick="wk.layer_close('close')">关闭</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{include file="public/footer" /}
</body>
</html>
<script>
    layui.use(['form','upload','layedit'], function() {
        var form = layui.form;
        form.on('submit(component-form-element)', function (data) {
            $('.layui-btn').addClass('layui-disabled').attr('disabled','disabled');
            $.ajax({
                url:"{:url('editDate')}",
                type:'post',
                dataType:'json',
                data:data.field,
                success:function(res){
                    if (res.code == 200) {
                        layer.msg(res.msg,{icon:1,time:1500,shade:0.1},function(index){
                            wk.layer_close();
                        })
                    } else {
                        wk.error(res.msg,'','$(".layui-btn").removeClass(\'layui-disabled\').removeAttr(\'disabled\');');
                    }
                }
            })
        });
    });
</script>